package com.example.settlement.service;

import com.example.settlement.entity.UserInfo;
import com.example.settlement.mapper.UserInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;

    public void addSettlement(UserInfo userinfo) {
        userInfoMapper.insert(userinfo);
    }

    public List<UserInfo> getUserInfoByUserId(Long userId) {
        return userInfoMapper.findByUserId(userId);
    }
}
